'use strict';
module.exports = {
	/**
	 * XXXnameXXX
	 * @url admin/pages/files_mzgl/page_binding/kh/epid 前端调用的url参数地址
	 * data 请求参数
	 * @param {String} params1  参数1
	 */
	main: async (event) => {
		let {
			data = {}, userInfo, util, filterResponse, originalParam
		} = event;
		let {
			customUtil,
			uniID,
			config,
			pubFun,
			vk,
			db,
			_
		} = util;
		let {
			uid
		} = data;
		let res = {
			code: 0,
			msg: ""
		};
		// 业务逻辑开始-----------------------------------------------------------

		console.log("userInfo==========", userInfo.album_id);

		let res_id = await vk.baseDao.select({
			dbName: "dy_tv", // 表名
			whereJson: { // 条件
				album_id: userInfo.album_id 
			},
			// 代表只显示_id和money字段
			fieldJson: {
				_id: true,
			},
		});

		console.log("res_id===", res_id.rows[0]._id);


		res = await vk.baseDao.select({
			dbName: "dy_tv_series", // 表名
			pageIndex: 1, // 当前第几页
			pageSize: -1, // 每页条数
			whereJson: { // 条件
				tv_id: res_id.rows[0]._id 
			},
		});




		// 业务逻辑结束-----------------------------------------------------------
		return res;
	}
}